package com.jwdf.uda.ui.activity;

import com.jwdf.uda.R;
import com.jwdf.uda.event.UserEvent;
import com.jwdf.uda.ui.fragment.base.BaseFragment;
import com.jwdf.uda.ui.fragment.user.SettingFragment;
import com.jwdf.uda.utils.EventBusUtil;

/**
 * 类说明：
 */
public class SettingActivity extends AbsTitleBarActivity {
    @Override
    protected String getTopTitle() {
        return getString(R.string.title_setting);
    }

    @Override
    protected BaseFragment onCreateContentFragment() {
        return new SettingFragment();
    }

    @Override
    protected void onStart() {
        super.onStart();
        EventBusUtil.registerEvent(this);
    }

    @Override
    protected void onStop() {
        super.onStop();
        EventBusUtil.unregisterEvent(this);
    }

    public void onEvent(UserEvent event) {
        if (UserEvent.EVENT_LOGOUT == event.getEvent()) {
            finish();
        }
    }
    
}
